From 0cb7b470ae0fc1754e79c81a07bf02b5624ea742 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 7 May 2010 09:15:19 +0100 Subject: [PATCH] xl: Start enumerating vifs from 0. Signed-off-by: Stefano Stabellini --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 329bf235f8..18f4b5fc40 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -544,7 +544,7 @@ static void parse_config_data(const char *configfile_filename_report, char *buf2 = strdup(buf); char *p, *p2; *vifs = (libxl_device_nic *) realloc(*vifs, sizeof (libxl_device_nic) * ((*num_vifs) + 1)); - init_nic_info((*vifs) + (*num_vifs), (*num_vifs) + 1); + init_nic_info((*vifs) + (*num_vifs), (*num_vifs)); p = strtok(buf2, ","); if (!p) goto skip; -- 2.30.2